home *** CD-ROM | disk | FTP | other *** search
- function main()
- {
- if(this.procNum == 1)
- {
- if(this.presentFlg == false)
- {
- this.checktobby();
- }
- }
- }
- function checktobby()
- {
- var dx = Math.abs(_root.tobbyMC._x - (_root.mapMC._x + this._x));
- if(dx < this.mesXarea && this.outAreaFlg == true)
- {
- this.openMes();
- if(this.presentFlg == false)
- {
- this.attachMovie("NPC_present","presentMC",10);
- this.presentMC._x = -50;
- this.presentMC._y = -120;
- this.presentFlg = true;
- }
- }
- else
- {
- this.outAreaFlg = true;
- }
- }
- function openMes()
- {
- this.mesMC.gotoAndStop(this.getLabelName());
- this.mesMC._visible = true;
- this.openMesFlg = true;
- }
- function getLabelName()
- {
- if(20 >= _root.getHosekiCnt)
- {
- return "a";
- }
- if(25 >= _root.getHosekiCnt)
- {
- return "b";
- }
- return "c";
- }
- function mesClose()
- {
- this.mesMC._visible = false;
- }
- this.mesMC._visible = false;
- this.outAreaFlg = true;
- this.presentFlg = false;
- this.mesXarea = 50;
- this.pCnt = 0;
- this._visible = true;
- this.procNum = 1;
-